<!DOCTYPE html>
<title>Window Object 'onmove'</title>
<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com">
<link rel="help" href="https://html.spec.whatwg.org/multipage/#handler-window-onmove">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>

<script>
promise_test((t) => {
  var expectedRect = {'x': 100, 'y': 200};
  return new Promise(resolve => {
      window.addEventListener("move", resolve);
      test_driver.set_window_rect(expectedRect);
  }).then(event => {
      return test_driver.get_window_rect()
          .then(rect => {
              assert_equals(rect.x, expectedRect.x, "The window rect X is correct.")
              assert_equals(rect.y, expectedRect.y, "The window rect Y is correct.")
          });
  });
}, "Window move event");
</script>
